<?php

namespace Yz\modules\Generic;
use Yz_Hash;

class Template_ModuleMenu
    extends \Yz_Template_Native
{

    /**
     *
     */
    protected function doRender()
    {
        debug();
        $this->createMenu();
        return parent::doRender();
    }


    /**
     *
     */
    protected function createMenu()
    {
        debug();
        $val =& $this->value;
        $baseURI = $val['YzModuleHref'];
        $menu = array();
        $menu[] = new Yz_Hash(array(
            'href' => $baseURI . 'default',
            'title' => $this->translate(':Default'),
            ));
        $menu[] = new Yz_Hash(array(
            'href' => $baseURI . 'list',
            'title' => $this->translate(':List'),
            ));
        $menu[] = new Yz_Hash(array(
            'href' => $baseURI . 'add',
            'title' => $this->translate(':Add'),
            ));
        $val['menu'] = $menu;
        return $this;
    }

}
